package com.jybd.live.service.impl;

import com.jybd.live.dao.RecordDao;
import com.jybd.live.model.Record;
import com.jybd.live.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RecordServiceImpl implements RecordService {

    private RecordDao recordDao;

    @Autowired
    public RecordServiceImpl(RecordDao recordDao) {
        this.recordDao = recordDao;
    }

    @Override
    public List<Record> getRecord(String app, String stream) {
        return recordDao.getByAppAndStream(app, stream);
    }

    @Override
    public Record getById(Integer id) {
        return recordDao.getById(id);
    }
}
